<html>

<head>
    <title>Socket Test</title>
    <script src="https://cdn.socket.io/4.7.1/socket.io.min.js"></script>
    <script>
        var socket = io('http://localhost:8081');
        socket.on('connect', function() {
            console.log('connected');
        });
        socket.on('all', function(data) {
            console.log(data);
        });
    </script>
</head>
<body>
<button onclick="socket.emit('say', 'I say some thing')">TestSay</button>
<button onclick="socket.emit('join', 'I want to join the room')">Join</button>
<button onclick="socket.emit('say-inroom', 'say some in room')">InRoom</button>
<button onclick="socket.emit('test-error', 'this is a error')">Test Error</button>
<button onclick="socket.close()">Close</button>
</body>
</html>